package com.ddw.meedeeuh.shared.movie.database;

import java.util.Map;
import java.util.concurrent.Future;

import com.ddw.meedeeuh.shared.database.DatabaseCallback;
import com.ddw.meedeeuh.shared.database.DatabaseException;
import com.ddw.meedeeuh.shared.database.DatabaseVersionException;
import com.ddw.meedeeuh.shared.movie.Movie;

public interface MovieDB {

	public void create(DatabaseCallback<Boolean> callback);

	public Future<Map<Integer, DBMovie>> movies(DatabaseCallback<Map<Integer, DBMovie>> callback);

	public Future<DBMovie> movie(int movieId, DatabaseCallback<DBMovie> callback);

	public Future<Boolean> deleteMovies(DatabaseCallback<Boolean> callback);

	public Future<Boolean> deleteMovie(int movieId, DatabaseCallback<Boolean> callback);

	public Future<DBMovie> setMovie(Movie movie, DatabaseCallback<DBMovie> callback);

	public void exec(String sql) throws DatabaseVersionException, DatabaseException;

	public int execInt(String sql) throws DatabaseVersionException, DatabaseException;

	public double execDouble(String sql) throws DatabaseVersionException, DatabaseException;

	public String execString(String sql) throws DatabaseVersionException, DatabaseException;

	public boolean execBoolean(String sql) throws DatabaseVersionException, DatabaseException;

	public void clean() throws DatabaseVersionException, DatabaseException;

}
